
<h3 mat-dialog-title class="mb-1">Configure OpenAI</h3>

<form (ngSubmit)="save()">

  <div mat-dialog-content>

    <p class="text-muted mt-0 mb-4">
      Supply your OpenAI API key.
      You can get an API key <a href="https://beta.openai.com/account/api-keys" target="_blank">here</a>.
    </p>

    <mat-form-field class="w-100 standalone-field">
      <span
        matPrefix
        matTooltip="OpenAI API key"
        class="d-flex flex-nowrap align-items-center justify-content-between me-2">
        <mat-icon>key</mat-icon>
        <span class="text-muted">|</span>
      </span>
      <input
        matInput
        cdkFocusInitial
        placeholder="OpenAI API key"
        [(ngModel)]="openApiKey"
        name="openApiKey"
        autocomplete="off">
    </mat-form-field>

  </div>

  <div mat-dialog-actions [align]="'end'">

    <button
      mat-button
      [mat-dialog-close]="{ configured: false }">
      Cancel
    </button>

    <button
      mat-flat-button
      color="primary"
      type="submit">
      Save
    </button>

  </div>

</form>
